package com.neusoft.rental.controller;

import com.neusoft.rental.po.Goodsappointment;
import com.neusoft.rental.service.GoodsAppointmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/GoodsappointmentController")
public class GoodsappointmentController {

    @Autowired
    private GoodsAppointmentService goodsappointmentService;

    //提交物资申请时增加物资申请
    @RequestMapping("/addGoodsappointment")
    public int addGoodsappointment(Goodsappointment goodsappointment) {
        return goodsappointmentService.addGoodsAppointment(goodsappointment);
    }

    //管理员查询物资申请
    @RequestMapping("/getGoodsappointment")
    public List<Goodsappointment> getGoodsappointment(Goodsappointment goodsappointment) {
        return goodsappointmentService.getGoodsappointment(goodsappointment);
    }
    //
    @RequestMapping("/judgeGoodsappointment")
    public int judgeGoodsappointment(Goodsappointment goodsappointment){
        return goodsappointmentService.judgeGoodsAppointment(goodsappointment);
    }
}
